home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / AHDI / IDEINST / ADDR.C next >
Encoding:
C/C++ Source or Header  |  2001-02-09  |  1.8 KB  |  54 lines

  1. /*  addr.c */
  2.  
  3. #include <obdefs.h>
  4. #include "defs.h"
  5. #include "hinstall.h"
  6.  
  7. /* Dialogue boxes */
  8. OBJECT *menubar;    /* menu bar */
  9. OBJECT *about;        /* release date of this version */
  10. OBJECT *logdev;        /* logical device numbers */
  11. OBJECT *instfnl;    /* final warning for installing driver */
  12. OBJECT *unstfnl;    /* final warning for removing driver */
  13.  
  14. /* Error messages */
  15. char *nomemory;        /* not enough memory */
  16. char *noavdrv;        /* no available drive for installation */
  17. char *cantinst;        /* cannot install driver */
  18. char *rootread;        /* root sector read error */
  19. char *rootwrit;        /* root sector write error */
  20. char *bootread;        /* boot sector read error */
  21. char *bootwrit;        /* boot sector write error */
  22. char *wrdvrerr;        /* error when writing driver */
  23. char *crdvrerr;        /* error when creating driver destination */
  24. char *opdvrerr;        /* error when opening driver source */
  25. char *nodriver;        /* no existing driver on disk */
  26.  
  27. getalladdr()
  28. {
  29.     /* get addresses of all dialogue boxes */
  30.     if (rsrc_gaddr(0, MENUBAR, &menubar) == 0
  31.     || rsrc_gaddr(0, ABOUT, &about) == 0
  32.     || rsrc_gaddr(0, LOGDEV, &logdev) == 0
  33.     || rsrc_gaddr(0, INSTFNL, &instfnl) == 0
  34.     || rsrc_gaddr(0, UNSTFNL, &unstfnl) == 0)
  35.     return ERROR;
  36.  
  37.     /* get addresses of all error messages */
  38.     if (rsrc_gaddr(5, NOMEMORY, &nomemory) == 0
  39.     || rsrc_gaddr(5, NOAVDRV, &noavdrv) == 0
  40.     || rsrc_gaddr(5, CANTINST, &cantinst) == 0
  41.     || rsrc_gaddr(5, ROOTREAD, &rootread) == 0
  42.     || rsrc_gaddr(5, ROOTWRIT, &rootwrit) == 0
  43.     || rsrc_gaddr(5, BOOTREAD, &bootread) == 0
  44.     || rsrc_gaddr(5, BOOTWRIT, &bootwrit) == 0
  45.     || rsrc_gaddr(5, WRDVRERR, &wrdvrerr) == 0
  46.     || rsrc_gaddr(5, CRDVRERR, &crdvrerr) == 0
  47.     || rsrc_gaddr(5, OPDVRERR, &opdvrerr) == 0
  48.     || rsrc_gaddr(5, NODRIVER, &nodriver) == 0)
  49.     return ERROR;
  50.     
  51.     return OK;
  52. }
  53.  
  54.